<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>

<link type="text/css" rel="stylesheet" href="App/Home/View/Public/css/reset.css">
<link type="text/css" rel="stylesheet" href="App/Home/View/Public/css/DateTimePicker.css">
<link type="text/css" rel="stylesheet" href="App/Home/View/Public/css/style.css">

<script type="text/javascript" src="App/Home/View/Public/script/jquery.js"></script>
<script type="text/javascript" src="App/Home/View/Public/script/distpicker.data.js"></script>
<script type="text/javascript" src="App/Home/View/Public/script/distpicker.js"></script>
<script type="text/javascript" src="App/Home/View/Public/script/DateTimePicker.js"></script>
<script type="text/javascript" src="App/Home/View/Public/layer/layer.js"></script>
<script type="text/javascript" src="App/Home/View/Public/script/jquery.SuperSlide.2.1.1.js"></script>
<style>
.hhhh{color: #49bf9d;}
</style>
<script type="text/javascript">


$(function(){

    $(".sh a").each(function(index){
      
     $(this).click(function(){   
         $('.sh').eq(index).addClass('hhhh').siblings().removeClass('hhhh');

       var id=$(this).attr('data-arr');

  $.ajax({
      url:'index.php?m=Home&c=Index&a=spid',
      data:{
         'spid':id
        },
        type:'post',
        dataType:'json',
        success:function(data){
                  
          var str="";
      
          for (var i = 0; i < data.length; i++) {

            
            str+=' <div class="c2li c2li2 fl" > <a class="img" href="<?php echo U('Shop/detail');?>&id='+data[i].id+'" ><img src="Uploads/'+data[i].img+'"><b>'+data[i].name+'</b></a></div>';
                
          }
            $('.c2list').html(str);
       


       
        }

    });




   });  
    });       




})


</script>
</head>

<body>
    
    <!--top-->

    <style>
        .top1 a{ position: relative;}
        .top1 a:hover{
          color: red
         }
        .message-num {
            position: absolute;
            left: 40px;
            top: -7px;
            width: 17px;
            height: 18px;
            background-color: #d45d51;
            border-radius: 100%;
            text-align: center; padding-left:2px 
        }
        .fa-lg{margin-right: 10px;}
        .message-num{font-size:12px;color: #ffffff}
        .x-info{margin-top:3px;margin-right: 3px;}
        .dropdown-menu{border: 1px solid #000000;width: 110px;position: absolute;top: 25px;left: 0px;height: 150px;}
        .open{display:block} 

        .gouwuche{position: absolute;
    left: 70px;
    top: -8px;
    width: 18px;
    height: 18px;
    background-color: #d45d51;
    border-radius: 100%;
    text-align: center;
    line-height: 18px;
    color: #fff; 
    font-size: 12px}
    </style>
    <link type="text/css" rel="stylesheet" href="App/Home/View/Public/font-awesome/css/font-awesome.css">

    <div class="top">
      
        <div class="top1">
          <div class="widthBlock">
                   
           <?php if($_SESSION['userr'] == ''): ?><a href="<?php echo U('User/login');?>">登录</a>
              <a href="<?php echo U('User/register');?>">注册</a>
           <?php elseif($_SESSION['zhuangtai'] == 0): ?>
              <?php if($_SESSION['zt'] == 0): ?><a href="<?php echo U('User/gouwu');?>">购物车
                <?php if(($gwcount) > "0"): ?><div class="gouwuche"><?php echo ($gwcount); ?></div><?php endif; ?>
               </a>
              <a href="<?php echo U('User/sheji');?>">申请设计师</a>
              <?php else: ?>
                  <a href="<?php echo U('User/gouwu');?>">购物车
                   <?php if(($gwcount) > "0"): ?><div class="gouwuche"><?php echo ($gwcount); ?></div><?php endif; ?>

                  </a>
                <a href="<?php echo U('User/shenhe');?>">申请设计师</a><?php endif; ?>
              <a class="" href="<?php echo U('User/person');?>">   

               <?php if(($num) > "0"): ?><div class="message-num" data-role="now-message-num"  style=""><div class="x-info"><?php echo ($num); ?></div></div><?php endif; ?>
                  <i class="fa fa-comment fa-lg"></i>
                  <?php echo ($_SESSION['userr']); ?>
              </a>
              <a href="<?php echo U('User/loginout');?>" target="_top" class="link2">退出</a>
          <?php else: ?>
              <?php if($_SESSION['zt'] == 2): ?><a href="<?php echo U('User/gouwu');?>">购物车
               <?php if(($gwcount) > "0"): ?><div class="gouwuche"><?php echo ($gwcount); ?></div><?php endif; ?>
               </a>
              <a href="<?php echo U('User/shenhe');?>">申请设计师</a><?php endif; ?>
      <a href="<?php echo U('User/person');?>" >
                   <div class="main-menu">
                   <?php if(($num) > "0"): ?><div class="message-num" data-role="now-message-num"  style=""><div class="x-info"><?php echo ($num); ?></div></div><?php endif; ?>
                   <i class="fa fa-comment fa-lg"></i>
                   <?php echo ($_SESSION['userr']); ?>
                   </div>


               </a>
            <a href="<?php echo U('User/loginout');?>" target="_top" class="link2">退出</a><?php endif; ?>
              <!-- <a href="#">我要装修</a> -->
              <span>咨询中心：<?php echo ($info1["dianhua"]); ?></span>
            </div>
        </div>
        <form method="post" action="<?php echo U('search');?>">
        <div class="top2">
          <div class="widthBlock">
              <a href="<?php echo U('Index/index');?>"><img src="App/Home/View/Public/images/logo.jpg"></a>
                <input style="border: 1px solid #49bf9d;" type="text" name="title" placeholder="商品名称,风格,户型"><button type="submit">搜索</button>
            </div>
        </div>
        </form>
        
        <div class="top3">
          <div class="widthBlock">
              <ul>
                  <li id="menu1">
                      <a href="<?php echo U('Index/index');?>">首页</a>
                    </li>
                    <li id="menu2">
                      <a href="<?php echo U('Shop/index');?>">商城</a>
                    </li>
                    <li id="menu3">
                      <a href="<?php echo U('Sheji/index');?>">设计师</a>
                    </li>
                    <li id="menu4">
                      <a href="<?php echo U('Quanzi/index');?>">圈子</a>
                    </li>
                    <li id="menu5">
                      <a href="<?php echo U('Zixun/index');?>">资讯</a>
                    </li>
                    <li id="menu6">
                      <a href="<?php echo U('Tiyan/index');?>">体验门店</a>
                    </li>
                    <li class="clear"></li>
                </ul>
            </div>
        </div>
        
    </div>

    <!--top end-->



    <!--contain-->
    <div class="contain">

        <div class="indexCont">
        	<div class="widthBlock">
            	<div class="cont1">
                	<div class="form fl">
                    	<form  action="<?php echo U('Index/yuyue');?>" method="post">
                        <div class="title">
                        	预约体验
                        </div>
                        <div class="count" data-number="<?php echo ($ci); ?>">
                        	
                        </div>
                        <div class="inputBlock">
                        	<input type="text" placeholder="您的姓名" required name="name">
                        </div>
                        <div class="inputBlock" id="distpicker">
                        	<select data-province="省" name="sheng" id="sheng">

                            </select><select data-city="市" name="shi" id="shi">

                            </select><select data-district="区" name="qu" id="qu">

                            </select>
                        </div>
                        <div class="inputBlock">
                        	<select style="width:100%;" name="tiyan" id="tiyan">
                            	<option value="0">体验门店</option>
                                <?php if(is_array($tiyan)): $i = 0; $__LIST__ = $tiyan;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["address"]); ?>"><?php echo ($vo["address"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                        <div class="inputBlock">
                        	<input class="datetime" type="text" placeholder="体验日期" name="time" data-field="datetime" readonly required>
                        </div>
                        <div class="inputBlock">
                        	<input type="text" placeholder="手机号码" required name="tel">
                        </div>
                        <div class="inputBlock sp1">
                        	<input type="checkbox" id="checkboxid" checked>我已阅读并接受<a href="#">《装修常见问题条款》</a>
                        </div>
                        <input type="hidden" id="yuyue" value="<?php echo ($_SESSION['userid']); ?>">
                        <div class="inputBlock btn">
                        	<button id="butt" type="submit">立即预约</button>
                        </div>
                        </form>
                    </div>
                    <div class="banner fr">

                    	<div id="slideBox" class="slideBox">
                            <div class="hd">
                                <ul></ul>
                            </div>
                            <div class="bd">
                                <ul>
                                    <?php if(is_array($roll)): $i = 0; $__LIST__ = $roll;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><a href="#"><img src="Uploads/<?php echo ($vo["pic"]); ?>"></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
                                </ul>
                            </div>

                        </div>

                    </div>
                    <div class="clear"></div>
                </div>

                <div class="cont2">
                	<div class="indexTitle itBorder">
                    	<div class="theTitle fl">
                        	<h1>DISPLAY GOODS</h1>
                            <h2>展示商品</h2>
                        </div>
                        <div class="itNav fr">
                        	<ul>
                            	<?php if(is_array($type)): $i = 0; $__LIST__ = $type;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class="sh">
                                	<a href="javascript:;"    data-arr="<?php echo ($vo["id"]); ?>">
                                        <img src="App/Home/View/Public/<?php echo ($vo["img"]); ?>">
                                        <p><?php echo ($vo["type_name"]); ?></p>
                                    </a>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                                <li class="clear"></li>
                            </ul>
                        </div>
                        <div class="clear"></div>
                    </div>
                    <div class="c2list">
                    <?php if(is_array($shangpin)): $i = 0; $__LIST__ = $shangpin;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="c2li c2li2 fl">
                            <a class="img" href="<?php echo U('Shop/detail',array('id'=>$vo[id]));?>">
                                <img src="Uploads/<?php echo ($vo["img"]); ?>">
                                <b><?php echo ($vo["name"]); ?></b>
                            </a>
                            
                        
                        </div><?php endforeach; endif; else: echo "" ;endif; ?>
                        <div class="clear"></div>
                    </div>
                </div>
           <div class="clear"></div>
                <div class="cont3">
                	<div class="indexTitle">
                    	<div class="theTitle fl">
                        	<h1>DESIGNER</h1>
                            <h2>设计师</h2>
                        </div>
                        <div class="clear"></div>
                        <a class="more" href="<?php echo U('Sheji/index');?>">更多》</a>
                    </div>
                    <div class="c3list">
                    	
                        
                        
                    <?php if(is_array($sheji)): $i = 0; $__LIST__ = $sheji;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="c3li fl">
                        	<div class="img">
                            	<a href="<?php echo U('sheji/detail',array('id'=>$vo[id]));?>"><img width="80" height="80" src="Uploads/<?php echo ($vo["touxiang"]); ?>"></a>
                            </div>
                            <h1><?php echo ($vo["user"]); ?></h1>
                            <ul>
                          <!--   	<li>
                                	<img src="App/Home/View/Public/images/c3list_icon01.png">
                                    <p>28人预约</p>
                                </li> -->
                                <li style="margin-left: 30px">
                                	<img src="App/Home/View/Public/images/c3list_icon02.png">
                                    <p>9.8分</p>
                                </li>
                                <li>
                                	<img src="App/Home/View/Public/images/c3list_icon03.png">
                                    <p><?php echo ($vo["count"]); ?>套作品</p>
                                </li>
                                <li class="clear"></li>
                            </ul>
                            <h2>擅长风格：<?php echo ($vo["fengge"]); ?></h2>
                            <h2>服务城市：<?php echo ($vo["chengshi"]); ?></h2>
                        </div><?php endforeach; endif; else: echo "" ;endif; ?>
                        <div class="clear"></div>
                    </div>
                </div>

           
<div class="clear"></div>
                <div class="c5blank">
                	<div class="cont5 fl">
                    	<div class="indexTitle">
                            <div class="theTitle fl">
                                <h1>CIRCLE</h1>
                                <h2>圈子</h2>
                            </div>
                            <div class="clear"></div>
                            <a class="more" href="<?php echo U('Quanzi/index');?>">更多》</a>
                        </div>
                        <div class="c5list">
                        	<ul>
                            <?php if(is_array($quanzi)): $i = 0; $__LIST__ = $quanzi;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
                              
                                	<div class="img">
                                		<a href="<?php echo U('Quanzi/details',array('id'=>$vo[id]));?>"><img width="409" height="164" src="Uploads/<?php echo ($vo["img"]); ?>"></a>
                                    </div>
                                   
                                    <div class="info">
                                    	<img src="Uploads/<?php echo ($vo["touxiang"]); ?>"><?php echo ($vo["user"]); ?>
                                        <h1><a href="<?php echo U('Quanzi/details',array('id'=>$vo[id]));?>"><?php echo ($vo["title"]); ?></a></h1>
                                    </div>
                                    <div class="text">
                                    	<?php echo ($vo["content"]); ?>
                                    </div>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                        
                                <li class="clear"></li>
                            </ul>
                        </div>
                        <div class="indexTitle">
                            <div class="theTitle fl">
                                <h1>INFORMATION</h1>
                                <h2>资讯</h2>
                            </div>
                            <div class="clear"></div>
                            <a class="more" href="<?php echo U('Zixun/index');?>">更多》</a>
                        </div>
                        <div class="c5list">
                        	<ul> 
                             <?php if(is_array($zixun)): $i = 0; $__LIST__ = $zixun;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
                                	<div class="img">
                                		<a href="<?php echo U('Zixun/detail',array('id'=>$vo[id]));?>"><img width="409" height="164" src="Uploads/<?php echo ($vo["pic"]); ?>"></a>
                                    </div>
                                
                                
                                    <div class="question">
                                    	<dl>
                                      
                                        	<dd>
                                            	<a href="<?php echo U('Zixun/detail',array('id'=>$vo[id]));?>"> <?php echo ($vo["title"]); ?></a>
                                            </dd>
                                           
                                        </dl>
                                    </div>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                        
                                <li class="clear"></li>
                            </ul>
                        </div>
                    </div>
                    <div class="qr fr">
                    	<div class="qrTitle">
                        	官方微信
                        </div>
                        <div class="qrCont">
                        	<h1>润格微信</h1>
                            <img src="App/Home/View/Public/uploadfile/images/qr.jpg">
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>

        </div>
        <div id="dtBox"></div>
    </div>
    <!--contain end-->
</div>
    <!--bottom-->
    <div class="bottomBlank"></div>
    <div class="bottom">
      <div class="widthBlock">
          <h1>
 <?php if(is_array($guanyu2)): $i = 0; $__LIST__ = $guanyu2;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><a href="#"><?php echo ($vo["name"]); ?></a>|<?php endforeach; endif; else: echo "" ;endif; ?></h1>
            <p>免责声明：本网站部分内容由用户自行上传，如权利人发现在误传其作品情形，请及时与本站联系。</p>
            <p><?php echo ($info1["banquan"]); ?></p>
            <p><?php echo ($info1["beian"]); ?></p>
            <img src="App/Home/View/Public/images/bottom_icons.png">
        </div>
    </div>
    <!--bottom end-->
    

<script>
jQuery(document).ready(function(e) {
    
	var init0 = function(){
		var num = $(".indexCont .cont1 .form .count").attr("data-number");
		
		var html = "";
		for(var n = num.length-1;n>=0;n--)
		{
			var thenum = parseInt(num/Math.pow(10,n));
			num = num%Math.pow(10,n);
			html += '<b>'+thenum+'</b>';
		}
		
		$(".indexCont .cont1 .form .count").html("今日已有"+html+"人预约");
		
	}
	
	init0();
	
	$("#distpicker").distpicker({
		autoSelect:false
	});
	
	$("#dtBox").DateTimePicker();
	
	jQuery(".slideBox").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"fold",autoPlay:true});
	
});

$(function(){
  $('#butt').click(function(){



 if(!$('#checkboxid').is(':checked')) {
   layer.alert('同意装修问题条款');
  return false;
    }

    if($('#tiyan').val()==0) {
   layer.alert('请选择体验门店');
  return false;
    }

 var yuyue= $('#yuyue').val();
   if (yuyue=='') {

    layer.alert('请登录后预约');
     return false;
   }
  })
    

    $('#shi').change(function(){
        var sheng = $('#sheng').val();
        var shi = $('#shi').val();
      
       $('#tiyan').html("<option value='0'>体验门店</option>");

     $.ajax({

         url:'<?php echo U("Tiyan/chengshi");?>',
         type:'post',
         data:{
           'parm':sheng+shi,

         },
         dataType:'json',
         success:function(data){
                  console.log(data);
           if (data!=0) {
          var str="<option value='0'>体验门店</option>";

          for (var i = 0; i < data.length; i++) {
            
            str+=' <option>'+data[i]['address']+'</option>';
                 


          }
            $('#tiyan').html(str);
       

           }

         }


     })





    })







})

</script>
    <script type="text/javascript">document.getElementById("menu1").className="curr";</script>
</body>
</html>